package com.adeng.springbootdemo.hello.controller;

import com.adeng.springbootdemo.annotation.MvcControllerMethodLog;
import com.adeng.springbootdemo.bo.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author hzwengcheng 2018-06-05 14:10
 */
@RestController
public class HelloWorldController {

    @RequestMapping("/getUser")
    @MvcControllerMethodLog
    public User getUser(HttpServletRequest request) {

        System.out.println( request.getAttribute("cookieUrsAccount"));

        return User.builder()
                .userName("小明").passWord("xxxx").build();
    }
}
